home *** CD-ROM | disk | FTP | other *** search
- Gnuemacs development package
- by Cedric BEUST
-
-
- This is a set of gnuemacs-related utilities that I personally use for development
- on the Amiga. Since many other Amiga-programmers may be using gnuemacs for their
- work just like me, I thought they might enjoy finding similar tools back on their
- Amiga. Redistribute all of them freely, modify them, or do what you like with them.
- As long as no money is involved, you don't have to worry about anything. Remember :
- the emacs-lisp packages are under the GNU General Public License.
-
- Contents of this archive :
-
- cpr.el A gdb-like mode for use with SAS/C's CPR debugger.
- autodocs.el Facility to consult autodocs (or Amigaguide) within emacs.
- ed CygnusEd-like ed command (written in Arexx).
-
- comint.el An improved shell-mode, delivered as is (not modified in
- any way, provided for convenience with cpr.el).
-
-
- A reasonable knowledge of gnuemacs packages is assumed in order to use the two
- .el files, so I won't go into details too deeply (byte-compiling, remapping the
- keys, etc...). After all, there's little chance someone unfamiliar with gnuemacs
- would switch from their regular Amiga editor to gnuemacs. In other words : if you
- want a CPR-mode, you are already using the gdb-mode so you know the minimum on
- this topic...
-
- Remember that on the Amiga, the meta key is mapped both to ESC and Left-Alt. So
- when you see the indication M-s, you can get it by pressing either 'Esc s' or
- 'Left-amiga s'.
-
-
- cpr.el
- ------
-
- INSTALLING cpr.el
-
- Copy this file into the directory gnuemacs:lisp/. This mode requires the
- file comint.el to work, so you must copy this file there too. Load the file
- s:.emacs and add the following line :
-
- (load "cpr.el")
-
-
- USING cpr.el
-
- Then invoke the mode with 'M-x cpr'. All the rest is pretty straightforward.
- The main keys used in this mode are :
-
- M-s Steps by one line, and redisplays the source file and line.
- M-SPC Steps one source line over functions
- M-c Continues normal running
- C-x spc Define a breakpoint on line under the cursor (in source file)
-
- M-p Recall the previous line in the history
- M-n Recall the next line in the history
-
- See the mode help for more details (C-h m).
-
- These last two mappings come from the comint mode, used as the underlying
- mode instead of the shell-mode. If you only know shell.el, you will
- probably be most interested in the comint-mode.
-
-
- POSSIBLE BUGS
-
- Due to CPR's strange way of setting breakpoints (it requires the line number
- AND the function that contains it!), I had to add a function to compute
- the C-function containing the line the cursor is in. This function might
- fail if you use a very non-standard indentation style. The only assumption
- is that a function name is followed by an opening brace ({) at the beginning
- of the line. If you don't use this style, adapt the regular expression
- "^{} in the function cpr-function-name, or change your style (latter strongly
- suggested :-)).
-
-
-
-
- autodocs.el
- -----------
-
- INSTALLING autodocs.el
-
- Copy this file into the directory gnuemacs:lisp/ and add the following line
- in your s:.emacs file :
-
- (load "autodocs.el")
-
-
- USING autodocs.el
-
- This package allows you to ask the autodocs about the function or structure
- pointed to by the cursor. If an Amigaguide autodoc exists, it will be displayed,
- otherwise, a regular .doc will be loaded in emacs. When loaded, the packages
- assigns the key F2 to the main function. For example, put your cursor in the
- word OpenWindow() and press F2.
-
- So that gnuemacs can find the proper library, there must be a file listing
- all the functions and their home library. If you own Amigaguide, this file
- will be automatically generated by the program AD2HT with the XREF option.
- Otherwise, you will have to create it yourself. Its format is most simple :
- one line per function, two words per line : the function and its library.
- For example :
-
- "AddLibrary()" "exec"
- "AddMemHandler()" "exec"
- "AddMemList()" "exec"
-
- The file must be called "Autodocs.XRef" and be located somewhere in the
- Amigaguide path (you can create it even if you don't have Amigaguide).
- Suppose you created your file as "DH0:Docs/Autodocs.xref", all you have
- to do is :
-
- 1> setenv Amigaguide/path DH0:Docs
-
- See the various variables controlling this as defvars' in the autodocs.el
- file.
-
- If gnuemacs can't find the appropriate Amigaguide file, it will search in the
- Autodocs: directory for a regular ASCII autodoc and load it in a separate
- buffer.
-
-
- POSSIBLE BUGS
-
- The package might fail if the cursor is on the first character of the word,
- so your best bet is to put the cursor in the middle of the word. It will also
- fail if the word contains a _ (strange way of gnuemacs to guess what a word
- is). I'll fix these bugs very shortly.
-
- The commands launching is very kludgy (use of Arexx) because process detachment
- wasn't working when I first wrote these lines. It can be greatly improved
- too.
-
-
-
-
- Ed
- --
-
- USING ED
-
- Ed is a very short Arexx program to emulate CygnusEd Ed's command.
-
- Its arguments are a list of files to load in emacs. If gnuemacs isn't loaded
- yet, it is loaded automatically. Then the argument files are loaded, one
- per buffer. This command can be used as a dock in Toolmanager for example,
- so you can merely drag a text file into it and see you gnuemacs screen
- pop up with the file displayed.
-
-
- POSSIBLE BUGS
-
- Ed assumes the existence of Bin:PSX. PSX is a public screen management
- utility by Steve Tibbett which use is strongly encouraged...
-
-
- One last word
- -------------
-
- I never intended to ever release these tools but there has been so much
- demands that I felt compelled to wrap up a quick distribution. Be tolerant
- with it and report any problems to me for a future distribution...
-
-
- Cedric BEUST
- beust@sa.inria.fr
-
-